<template>
  <div id="app">
<el-container>
  <el-aside width="200px">
<el-row class="tac">
  <el-col :span="12">
    <el-menu
      class="el-menu-vertical-demo"
      background-color="#545c64"
      text-color="#fff"
      active-text-color="#ffd04b">
      <el-submenu index="1">
          <i class="el-icon-document"></i>
        <span slot="title"><router-link to="/p11"> 页面1</router-link></span>
      </el-submenu>
       <el-menu-item index="2" >
        <i class="el-icon-setting"></i>
        <span slot="title" ><router-link to="/p22"> 页面2</router-link></span>
      </el-menu-item>
      <el-menu-item index="3" >
        <i class="el-icon-document"></i>
        <span slot="title" @click="dh3">页面3</span>
      </el-menu-item>
      <el-menu-item index="4" >
        <i class="el-icon-setting"></i>
        <span slot="title" ><router-link to="/p4"> 页面4</router-link></span>
      </el-menu-item>
    </el-menu>
  </el-col>
</el-row>


  </el-aside>
  <el-container>
    <el-header>Header</el-header>
    <el-main>
      <!-- 路由显示出口 -->
  <router-view></router-view>
    </el-main>
  </el-container>
</el-container>
  </div>
</template>

<script>
export default {
  methods:{
    dh1(){
      this.$router.push({
        path:'/p1'
      });
    },  dh2(){
      this.$router.push({
        path:'/p2'
      });
    },  dh3(){
      this.$router.push({
        path:'/p3',
        query:{
          name:'woshi超哥'
        }
      });
    },
    
  }
}
</script>

<style>
.el-header {
    background-color: #B3C0D1;
    color: #333;
    text-align: center;
    line-height: 60px;
  }
  
  .el-aside {
    background-color: #D3DCE6;
    color: #333;
    text-align: center;
    line-height: 200px;
  }
  
  .el-main {
    background-color: #E9EEF3;
    color: #333;
    text-align: center;
    line-height: 160px;
    height: 600px;
  }
  
 
</style>